<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8" />
  <title>bn::sprite_text_generator class | Butano Docs</title>
  <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,600,600i%7CSource+Code+Pro:400,400i,600" />
  <link rel="stylesheet" href="m-dark+documentation.compiled.css" />
  <link rel="icon" href="favicon-dark.png" type="image/png" />
  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  <meta name="theme-color" content="#22272e" />
</head>
<body>
<header><nav id="navigation">
  <div class="m-container">
    <div class="m-row">
      <span id="m-navbar-brand" class="m-col-t-8 m-col-m-none m-left-m">
        <a href="https://github.com/GValiente/butano">Butano</a> <span class="m-breadcrumb">|</span> <a href="index.html" class="m-thin">Docs</a>
      </span>
      <div class="m-col-t-4 m-hide-m m-text-right m-nopadr">
        <a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
          <path id="m-doc-search-icon-path" d="m6 0c-3.31 0-6 2.69-6 6 0 3.31 2.69 6 6 6 1.49 0 2.85-0.541 3.89-1.44-0.0164 0.338 0.147 0.759 0.5 1.15l3.22 3.79c0.552 0.614 1.45 0.665 2 0.115 0.55-0.55 0.499-1.45-0.115-2l-3.79-3.22c-0.392-0.353-0.812-0.515-1.15-0.5 0.895-1.05 1.44-2.41 1.44-3.89 0-3.31-2.69-6-6-6zm0 1.56a4.44 4.44 0 0 1 4.44 4.44 4.44 4.44 0 0 1-4.44 4.44 4.44 4.44 0 0 1-4.44-4.44 4.44 4.44 0 0 1 4.44-4.44z"/>
        </svg></a>
        <a id="m-navbar-show" href="#navigation" title="Show navigation"></a>
        <a id="m-navbar-hide" href="#" title="Hide navigation"></a>
      </div>
      <div id="m-navbar-collapse" class="m-col-t-12 m-show-m m-col-m-none m-right-m">
        <div class="m-row">
          <ol class="m-col-t-6 m-col-m-none">
            <li><a href="pages.html">Pages</a></li>
            <li><a href="modules.html">Modules</a></li>
          </ol>
          <ol class="m-col-t-6 m-col-m-none" start="3">
            <li><a href="namespaces.html">Namespaces</a></li>
            <li><a href="annotated.html">Classes</a></li>
            <li><a href="files.html">Files</a></li>
            <li class="m-show-m"><a href="#search" class="m-doc-search-icon" title="Search" onclick="return showSearch()"><svg style="height: 0.9rem;" viewBox="0 0 16 16">
              <use href="#m-doc-search-icon-path" />
            </svg></a></li>
          </ol>
        </div>
      </div>
    </div>
  </div>
</nav></header>
<main><article>
  <div class="m-container m-container-inflatable">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <h1>
          <span class="m-breadcrumb"><a href="namespacebn.html">bn</a>::<wbr/></span>sprite_text_generator <span class="m-thin">class</span>
          <div class="m-doc-include m-code m-inverted m-text-right"><span class="cp">#include</span> <a class="cpf" href="bn__sprite__text__generator_8h.html">&lt;bn_sprite_text_generator.h&gt;</a></div>
        </h1>
        <p>Generates sprites containing text from a given <a href="classbn_1_1sprite__font.html" class="m-doc">sprite_<wbr />font</a>.</p>
        <nav class="m-block m-default">
          <h3>Contents</h3>
          <ul>
            <li>
              Reference
              <ul>
                <li><a href="#pub-types">Public types</a></li>
                <li><a href="#typeless-methods">Constructors, destructors, conversion operators</a></li>
                <li><a href="#pub-methods">Public functions</a></li>
              </ul>
            </li>
          </ul>
        </nav>
<p>Currently, it supports 4 bits per pixel (16 colors) fixed width AND variable width characters.</p><p>Text can be printed in one sprite per character or multiple characters per sprite.</p><p>Also, UTF-8 characters are supported.</p>
        <section id="pub-types">
          <h2><a href="#pub-types">Public types</a></h2>
          <dl class="m-doc">
            <dt>
              <span class="m-doc-wrap-bumper">enum class <a href="#a89da843368dabd4bd82c0f47cde58087" class="m-doc">alignment_type</a>: uint8_t { </span><span class="m-doc-wrap"><a href="#a89da843368dabd4bd82c0f47cde58087a684d325a7303f52e64011467ff5c5758" class="m-doc">LEFT</a>,
              <a href="#a89da843368dabd4bd82c0f47cde58087ac397289ee45877be0cd49811fe245b4e" class="m-doc">CENTER</a>,
              <a href="#a89da843368dabd4bd82c0f47cde58087a21507b40c80068eda19865706fdc2403" class="m-doc">RIGHT</a> }</span>
            </dt>
            <dd>Available horizontal alignment types.</dd>
          </dl>
        </section>
        <section id="typeless-methods">
          <h2><a href="#typeless-methods">Constructors, destructors, conversion operators</a></h2>
          <dl class="m-doc">
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#a6b3750f69fc4f645a7b92a8eecbd29cd" class="m-doc">sprite_text_generator</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1sprite__font.html" class="m-doc">sprite_<wbr />font</a>&amp; font) <span class="m-label m-flat m-info">explicit</span> </span>
            </dt>
            <dd>Constructor.</dd>
            <dt>
              <span class="m-doc-wrap-bumper"><a href="#a5bb8b2ec1d4853580a68a0e32e171348" class="m-doc">sprite_text_generator</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1sprite__font.html" class="m-doc">sprite_<wbr />font</a>&amp; font,
              const <a href="classbn_1_1sprite__palette__item.html" class="m-doc">sprite_<wbr />palette_<wbr />item</a>&amp; palette_item)</span>
            </dt>
            <dd>Constructor.</dd>
          </dl>
        </section>
        <section id="pub-methods">
          <h2><a href="#pub-methods">Public functions</a></h2>
          <dl class="m-doc">
            <dt id="ab48feea481a985cc5afe7676566655df">
              <span class="m-doc-wrap-bumper">auto <a href="#ab48feea481a985cc5afe7676566655df" class="m-doc-self">font</a>(</span><span class="m-doc-wrap">) const -&gt; const <a href="classbn_1_1sprite__font.html" class="m-doc">sprite_<wbr />font</a>&amp;</span>
            </dt>
            <dd>Returns the sprite font for drawing text.</dd>
            <dt id="aa0ece0b5d181369985e03754b3a05639">
              <span class="m-doc-wrap-bumper">auto <a href="#aa0ece0b5d181369985e03754b3a05639" class="m-doc-self">palette_item</a>(</span><span class="m-doc-wrap">) const -&gt; const <a href="classbn_1_1sprite__palette__item.html" class="m-doc">sprite_<wbr />palette_<wbr />item</a>&amp;</span>
            </dt>
            <dd>Returns the <a href="classbn_1_1sprite__palette__item.html" class="m-doc">sprite_<wbr />palette_<wbr />item</a> that generates the color palette used by the text sprites.</dd>
            <dt id="af7ff48f67b1e6e04a99fa9c32ed04b83">
              <span class="m-doc-wrap-bumper">void <a href="#af7ff48f67b1e6e04a99fa9c32ed04b83" class="m-doc-self">set_palette_item</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1sprite__palette__item.html" class="m-doc">sprite_<wbr />palette_<wbr />item</a>&amp; palette_item)</span>
            </dt>
            <dd>Sets the 16 colors (4 bits per pixel) <a href="classbn_1_1sprite__palette__item.html" class="m-doc">sprite_<wbr />palette_<wbr />item</a> that generates the color palette used by the text sprites.</dd>
            <dt id="abd319998b1d9eab9d224b4faf7ee09e3">
              <span class="m-doc-wrap-bumper">auto <a href="#abd319998b1d9eab9d224b4faf7ee09e3" class="m-doc-self">alignment</a>(</span><span class="m-doc-wrap">) const -&gt; <a href="#a89da843368dabd4bd82c0f47cde58087" class="m-doc">alignment_<wbr />type</a></span>
            </dt>
            <dd>Returns the horizontal alignment of the output text sprites.</dd>
            <dt id="a311f4bea60c94deae9f44443183e699a">
              <span class="m-doc-wrap-bumper">void <a href="#a311f4bea60c94deae9f44443183e699a" class="m-doc-self">set_alignment</a>(</span><span class="m-doc-wrap"><a href="#a89da843368dabd4bd82c0f47cde58087" class="m-doc">alignment_<wbr />type</a> alignment)</span>
            </dt>
            <dd>Sets the horizontal alignment of the output text sprites.</dd>
            <dt id="aea88f10d7cf9f0025c93ba3b420c745a">
              <span class="m-doc-wrap-bumper">void <a href="#aea88f10d7cf9f0025c93ba3b420c745a" class="m-doc-self">set_left_alignment</a>(</span><span class="m-doc-wrap">)</span>
            </dt>
            <dd>Sets the horizontal alignment of the output text sprites to the left.</dd>
            <dt id="abccb2484a433247e1e48e1b4adf5bac9">
              <span class="m-doc-wrap-bumper">void <a href="#abccb2484a433247e1e48e1b4adf5bac9" class="m-doc-self">set_center_alignment</a>(</span><span class="m-doc-wrap">)</span>
            </dt>
            <dd>Sets the horizontal alignment of the output text sprites to the center.</dd>
            <dt id="a6f088bc9424cb34b9edb6e783452e39d">
              <span class="m-doc-wrap-bumper">void <a href="#a6f088bc9424cb34b9edb6e783452e39d" class="m-doc-self">set_right_alignment</a>(</span><span class="m-doc-wrap">)</span>
            </dt>
            <dd>Sets the horizontal alignment of the output text sprites to the right.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#ae5973b528a3d7c0c2a641610d68c2ec6" class="m-doc">bg_priority</a>(</span><span class="m-doc-wrap">) const -&gt; int</span>
            </dt>
            <dd>Returns the priority of the output sprites priority relative to backgrounds.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a05760eb0309ea5ca598c575526420507" class="m-doc">set_bg_priority</a>(</span><span class="m-doc-wrap">int bg_priority)</span>
            </dt>
            <dd>Sets the priority of the output sprites relative to backgrounds.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a2521acd1e556cc706f71c8b74b91875c" class="m-doc">z_order</a>(</span><span class="m-doc-wrap">) const -&gt; int</span>
            </dt>
            <dd>Returns the priority of the output sprites relative to other sprites.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#ab9871b3b3a52214ffd1aeefe0ff91918" class="m-doc">set_z_order</a>(</span><span class="m-doc-wrap">int z_order)</span>
            </dt>
            <dd>Sets the priority of the output sprites relative to other sprites.</dd>
            <dt id="a3f54d2db66691ef14bc89017e2fa4122">
              <span class="m-doc-wrap-bumper">auto <a href="#a3f54d2db66691ef14bc89017e2fa4122" class="m-doc-self">mosaic_enabled</a>(</span><span class="m-doc-wrap">) const -&gt; bool</span>
            </dt>
            <dd>Indicates if the mosaic effect must be applied to the output sprites or not.</dd>
            <dt id="a6debaf5cd4fce46d88600b2157f26005">
              <span class="m-doc-wrap-bumper">void <a href="#a6debaf5cd4fce46d88600b2157f26005" class="m-doc-self">set_mosaic_enabled</a>(</span><span class="m-doc-wrap">bool mosaic_enabled)</span>
            </dt>
            <dd>Sets if the mosaic effect must be applied to the output sprites or not.</dd>
            <dt id="a63927d816b20e0e70ba758a833fb5ea8">
              <span class="m-doc-wrap-bumper">auto <a href="#a63927d816b20e0e70ba758a833fb5ea8" class="m-doc-self">blending_enabled</a>(</span><span class="m-doc-wrap">) const -&gt; bool</span>
            </dt>
            <dd>Indicates if blending must be applied to the output sprites or not.</dd>
            <dt id="ae8506a18cf37d2f0441ccd20e5c2102f">
              <span class="m-doc-wrap-bumper">void <a href="#ae8506a18cf37d2f0441ccd20e5c2102f" class="m-doc-self">set_blending_enabled</a>(</span><span class="m-doc-wrap">bool blending_enabled)</span>
            </dt>
            <dd>Sets if blending must be applied to the output sprites or not.</dd>
            <dt id="aa6908a1d4294d3d77415471afc3eb1c5">
              <span class="m-doc-wrap-bumper">auto <a href="#aa6908a1d4294d3d77415471afc3eb1c5" class="m-doc-self">visible</a>(</span><span class="m-doc-wrap">) const -&gt; bool</span>
            </dt>
            <dd>Indicates if the output sprites must be committed to the GBA or not.</dd>
            <dt id="ac63844532a9106bbaf3d3a478cfddd11">
              <span class="m-doc-wrap-bumper">void <a href="#ac63844532a9106bbaf3d3a478cfddd11" class="m-doc-self">set_visible</a>(</span><span class="m-doc-wrap">bool visible)</span>
            </dt>
            <dd>Sets if the output sprites must be committed to the GBA or not.</dd>
            <dt id="a0528be3812ab3cea5941663806c67353">
              <span class="m-doc-wrap-bumper">auto <a href="#a0528be3812ab3cea5941663806c67353" class="m-doc-self">camera</a>(</span><span class="m-doc-wrap">) const -&gt; const <a href="classbn_1_1optional.html" class="m-doc">optional</a>&lt;<a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a>&gt;&amp;</span>
            </dt>
            <dd>Returns the <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a> to attach to the output sprites (if any).</dd>
            <dt id="a61deb24b9cefc3f8c4432a324d45b890">
              <span class="m-doc-wrap-bumper">void <a href="#a61deb24b9cefc3f8c4432a324d45b890" class="m-doc-self">set_camera</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a>&amp; camera)</span>
            </dt>
            <dd>Sets the <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a> to attach to the output sprites.</dd>
            <dt id="a3a46da5a73bbb169db07d9d5d598163d">
              <span class="m-doc-wrap-bumper">void <a href="#a3a46da5a73bbb169db07d9d5d598163d" class="m-doc-self">set_camera</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a>&amp;&amp; camera)</span>
            </dt>
            <dd>Sets the <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a> to attach to the output sprites.</dd>
            <dt id="aa45a6c6d74cecd9ae576b4a1d4c0be5b">
              <span class="m-doc-wrap-bumper">void <a href="#aa45a6c6d74cecd9ae576b4a1d4c0be5b" class="m-doc-self">set_camera</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1optional.html" class="m-doc">optional</a>&lt;<a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a>&gt;&amp; camera)</span>
            </dt>
            <dd>Sets or removes the <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a> to attach to the output sprites.</dd>
            <dt id="aa24fef8d903e31de437153879e3ee5ef">
              <span class="m-doc-wrap-bumper">void <a href="#aa24fef8d903e31de437153879e3ee5ef" class="m-doc-self">set_camera</a>(</span><span class="m-doc-wrap"><a href="classbn_1_1optional.html" class="m-doc">optional</a>&lt;<a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a>&gt;&amp;&amp; camera)</span>
            </dt>
            <dd>Sets or removes the <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a> to attach to the output sprites.</dd>
            <dt id="af7294da831758aa7014841d4b6fbd139">
              <span class="m-doc-wrap-bumper">void <a href="#af7294da831758aa7014841d4b6fbd139" class="m-doc-self">remove_camera</a>(</span><span class="m-doc-wrap">)</span>
            </dt>
            <dd>Removes the <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a> to attach to the output sprites.</dd>
            <dt id="a5f12e3a3ddb2674f77c07f4ce6cf1b23">
              <span class="m-doc-wrap-bumper">auto <a href="#a5f12e3a3ddb2674f77c07f4ce6cf1b23" class="m-doc-self">release_camera</a>(</span><span class="m-doc-wrap">) -&gt; <a href="classbn_1_1optional.html" class="m-doc">optional</a>&lt;<a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a>&gt;</span>
            </dt>
            <dd>Releases and returns the <a href="classbn_1_1camera__ptr.html" class="m-doc">camera_<wbr />ptr</a> to attach to the output sprites (if any).</dd>
            <dt id="a1e2a6ce20fb683b0a99fa7df0c830cb2">
              <span class="m-doc-wrap-bumper">auto <a href="#a1e2a6ce20fb683b0a99fa7df0c830cb2" class="m-doc-self">one_sprite_per_character</a>(</span><span class="m-doc-wrap">) const -&gt; bool</span>
            </dt>
            <dd>Indicates if this <a href="classbn_1_1sprite__text__generator.html" class="m-doc">sprite_<wbr />text_<wbr />generator</a> must generate one sprite per character or print multiple characters in each output sprite, generating as few sprites as possible.</dd>
            <dt id="a28655397d6238c360ed4ac74b3cf2fee">
              <span class="m-doc-wrap-bumper">void <a href="#a28655397d6238c360ed4ac74b3cf2fee" class="m-doc-self">set_one_sprite_per_character</a>(</span><span class="m-doc-wrap">bool one_sprite_per_character)</span>
            </dt>
            <dd>Sets if this <a href="classbn_1_1sprite__text__generator.html" class="m-doc">sprite_<wbr />text_<wbr />generator</a> must generate one sprite per character or print multiple characters in each output sprite, generating as few sprites as possible.</dd>
            <dt id="a676fe20fc545f23dedadfa6d35559d9f">
              <span class="m-doc-wrap-bumper">auto <a href="#a676fe20fc545f23dedadfa6d35559d9f" class="m-doc-self">width</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const -&gt; int</span>
            </dt>
            <dd>Returns the width in pixels of the given text.</dd>
            <dt>
              <div class="m-doc-template">template&lt;int MaxSprites&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#a8d4b731eecdb436b2c7b6055b0c1df34" class="m-doc">generate</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const -&gt; <a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt;</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <div class="m-doc-template">template&lt;int MaxSprites&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#af16f3c2f018295e9fa3cda38dbd6148a" class="m-doc">generate</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const -&gt; <a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt;</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <div class="m-doc-template">template&lt;int MaxSprites&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#af79c646f83873bd7727ea97028ab616b" class="m-doc">generate</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const -&gt; <a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt;</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a94b623efde99ea02a7313f22bfebbba7" class="m-doc">generate</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a94486be7627c307f473ed3e1a4f0a996" class="m-doc">generate</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a7db456fc2875b3098d16a5124bd4934a" class="m-doc">generate</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <div class="m-doc-template">template&lt;int MaxSprites&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#a89347835d0aa55d7ba213c7f66497f32" class="m-doc">generate_top_left</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const -&gt; <a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt;</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <div class="m-doc-template">template&lt;int MaxSprites&gt;</div>
              <span class="m-doc-wrap-bumper">auto <a href="#a0d7cfe82ee9c97ba4e7d547f639e0804" class="m-doc">generate_top_left</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; top_left_position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const -&gt; <a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt;</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a4a3dd965b224c85a25ee4ed0e6024b43" class="m-doc">generate_top_left</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">void <a href="#a2e8ee5db7020f0128b397e21136e2c75" class="m-doc">generate_top_left</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; top_left_position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a1ca037e46d4108df1598c35d30b4b10e" class="m-doc">generate_optional</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const -&gt; bool</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#afb6a6933bcae080758df5b636265a178" class="m-doc">generate_optional</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const -&gt; bool</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a71f5a0e2f9943084837eb33b1a9f8f85" class="m-doc">generate_optional</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const -&gt; bool</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a6aec8204e94548644cb8de1da209b66b" class="m-doc">generate_top_left_optional</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const -&gt; bool</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
            <dt>
              <span class="m-doc-wrap-bumper">auto <a href="#a658bb7f804fe078499c41d6478c86d47" class="m-doc">generate_top_left_optional</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; top_left_position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const -&gt; bool</span>
            </dt>
            <dd>Generates text sprites for the given single line of text.</dd>
          </dl>
        </section>
        <section>
          <h2>Enum documentation</h2>
          <section class="m-doc-details" id="a89da843368dabd4bd82c0f47cde58087"><div>
            <h3>
              enum class bn::<wbr />sprite_text_generator::<wbr /><a href="#a89da843368dabd4bd82c0f47cde58087" class="m-doc-self">alignment_type</a>: uint8_t
            </h3>
            <p>Available horizontal alignment types.</p>
            <table class="m-table m-fullwidth m-flat m-doc">
              <thead><tr><th style="width: 1%">Enumerators</th><th></th></tr></thead>
              <tbody>
                <tr>
                  <td><a href="#a89da843368dabd4bd82c0f47cde58087a684d325a7303f52e64011467ff5c5758" class="m-doc-self" id="a89da843368dabd4bd82c0f47cde58087a684d325a7303f52e64011467ff5c5758">LEFT</a></td>
                  <td>
                  <p>Aligns with the left text edge.</p>
                  </td>
                </tr>
                <tr>
                  <td><a href="#a89da843368dabd4bd82c0f47cde58087ac397289ee45877be0cd49811fe245b4e" class="m-doc-self" id="a89da843368dabd4bd82c0f47cde58087ac397289ee45877be0cd49811fe245b4e">CENTER</a></td>
                  <td>
                  <p>Aligns with the middle of the text.</p>
                  </td>
                </tr>
                <tr>
                  <td><a href="#a89da843368dabd4bd82c0f47cde58087a21507b40c80068eda19865706fdc2403" class="m-doc-self" id="a89da843368dabd4bd82c0f47cde58087a21507b40c80068eda19865706fdc2403">RIGHT</a></td>
                  <td>
                  <p>Aligns with the right text edge.</p>
                  </td>
                </tr>
              </tbody>
            </table>
          </div></section>
        </section>
        <section>
          <h2>Function documentation</h2>
          <section class="m-doc-details" id="a6b3750f69fc4f645a7b92a8eecbd29cd"><div>
            <h3>
              <span class="m-doc-wrap-bumper"> bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a6b3750f69fc4f645a7b92a8eecbd29cd" class="m-doc-self">sprite_text_generator</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1sprite__font.html" class="m-doc">sprite_<wbr />font</a>&amp; font) <span class="m-label m-info">explicit</span> </span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">font</td>
                  <td>Sprite font for drawing text.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="a5bb8b2ec1d4853580a68a0e32e171348"><div>
            <h3>
              <span class="m-doc-wrap-bumper"> bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a5bb8b2ec1d4853580a68a0e32e171348" class="m-doc-self">sprite_text_generator</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1sprite__font.html" class="m-doc">sprite_<wbr />font</a>&amp; font,
              const <a href="classbn_1_1sprite__palette__item.html" class="m-doc">sprite_<wbr />palette_<wbr />item</a>&amp; palette_item)</span></span>
            </h3>
            <p>Constructor.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">font</td>
                  <td>Sprite font for drawing text.</td>
                </tr>
                <tr>
                  <td>palette_item</td>
                  <td>16 colors (4 bits per pixel) <a href="classbn_1_1sprite__palette__item.html" class="m-doc">sprite_<wbr />palette_<wbr />item</a> that generates the color palette used by the text sprites.</td>
                </tr>
              </tbody>
            </table>
          </div></section>
          <section class="m-doc-details" id="ae5973b528a3d7c0c2a641610d68c2ec6"><div>
            <h3>
              <span class="m-doc-wrap-bumper">int bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ae5973b528a3d7c0c2a641610d68c2ec6" class="m-doc-self">bg_priority</a>(</span><span class="m-doc-wrap">) const</span></span>
            </h3>
            <p>Returns the priority of the output sprites priority relative to backgrounds.</p>
<p>Sprites with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds). Sprites cover backgrounds of the same priority.</p>
          </div></section>
          <section class="m-doc-details" id="a05760eb0309ea5ca598c575526420507"><div>
            <h3>
              <span class="m-doc-wrap-bumper">void bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a05760eb0309ea5ca598c575526420507" class="m-doc-self">set_bg_priority</a>(</span><span class="m-doc-wrap">int bg_priority)</span></span>
            </h3>
            <p>Sets the priority of the output sprites relative to backgrounds.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">bg_priority</td>
                  <td>Priority relative to backgrounds in the range [0..3].</td>
                </tr>
              </tbody>
            </table>
<p>Sprites with higher priority are drawn first (and therefore can be covered by later sprites and backgrounds). Sprites cover backgrounds of the same priority.</p>
          </div></section>
          <section class="m-doc-details" id="a2521acd1e556cc706f71c8b74b91875c"><div>
            <h3>
              <span class="m-doc-wrap-bumper">int bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a2521acd1e556cc706f71c8b74b91875c" class="m-doc-self">z_order</a>(</span><span class="m-doc-wrap">) const</span></span>
            </h3>
            <p>Returns the priority of the output sprites relative to other sprites.</p>
<p>Sprites with higher z orders are drawn first (and therefore can be covered by later sprites).</p>
          </div></section>
          <section class="m-doc-details" id="ab9871b3b3a52214ffd1aeefe0ff91918"><div>
            <h3>
              <span class="m-doc-wrap-bumper">void bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#ab9871b3b3a52214ffd1aeefe0ff91918" class="m-doc-self">set_z_order</a>(</span><span class="m-doc-wrap">int z_order)</span></span>
            </h3>
            <p>Sets the priority of the output sprites relative to other sprites.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">z_order</td>
                  <td>Priority relative to other sprites in the range [-32767..32767].</td>
                </tr>
              </tbody>
            </table>
<p>Sprites with higher z orders are drawn first (and therefore can be covered by later sprites).</p>
          </div></section>
          <section class="m-doc-details" id="a8d4b731eecdb436b2c7b6055b0c1df34"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int MaxSprites&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt; bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a8d4b731eecdb436b2c7b6055b0c1df34" class="m-doc-self">generate</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Template parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">MaxSprites</td>
                  <td>Maximum size of the returned <a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector.</td>
                </tr>
              </tbody>
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector containing the generated text sprites.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="af16f3c2f018295e9fa3cda38dbd6148a"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int MaxSprites&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt; bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#af16f3c2f018295e9fa3cda38dbd6148a" class="m-doc-self">generate</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Template parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">MaxSprites</td>
                  <td>Maximum size of the returned <a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector.</td>
                </tr>
              </tbody>
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td>x</td>
                  <td>Horizontal position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>y</td>
                  <td>Vertical position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector containing the generated text sprites.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="af79c646f83873bd7727ea97028ab616b"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int MaxSprites&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt; bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#af79c646f83873bd7727ea97028ab616b" class="m-doc-self">generate</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Template parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">MaxSprites</td>
                  <td>Maximum size of the returned <a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector.</td>
                </tr>
              </tbody>
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td>position</td>
                  <td>Position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector containing the generated text sprites.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a94b623efde99ea02a7313f22bfebbba7"><div>
            <h3>
              <span class="m-doc-wrap-bumper">void bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a94b623efde99ea02a7313f22bfebbba7" class="m-doc-self">generate</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a94486be7627c307f473ed3e1a4f0a996"><div>
            <h3>
              <span class="m-doc-wrap-bumper">void bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a94486be7627c307f473ed3e1a4f0a996" class="m-doc-self">generate</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">x</td>
                  <td>Horizontal position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>y</td>
                  <td>Vertical position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a7db456fc2875b3098d16a5124bd4934a"><div>
            <h3>
              <span class="m-doc-wrap-bumper">void bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a7db456fc2875b3098d16a5124bd4934a" class="m-doc-self">generate</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">position</td>
                  <td>Position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a89347835d0aa55d7ba213c7f66497f32"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int MaxSprites&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt; bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a89347835d0aa55d7ba213c7f66497f32" class="m-doc-self">generate_top_left</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Template parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">MaxSprites</td>
                  <td>Maximum size of the returned <a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector.</td>
                </tr>
              </tbody>
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td>top_left_x</td>
                  <td>Horizontal top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>top_left_y</td>
                  <td>Vertical top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector containing the generated text sprites.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a0d7cfe82ee9c97ba4e7d547f639e0804"><div>
            <h3>
              <div class="m-doc-template">
                template&lt;int MaxSprites&gt;
              </div>
              <span class="m-doc-wrap-bumper"><a href="classbn_1_1vector.html" class="m-doc">vector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>, MaxSprites&gt; bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a0d7cfe82ee9c97ba4e7d547f639e0804" class="m-doc-self">generate_top_left</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; top_left_position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Template parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">MaxSprites</td>
                  <td>Maximum size of the returned <a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector.</td>
                </tr>
              </tbody>
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td>top_left_position</td>
                  <td>Top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a> vector containing the generated text sprites.</td>
                </tr>
              </tfoot>
            </table>
          </div></section>
          <section class="m-doc-details" id="a4a3dd965b224c85a25ee4ed0e6024b43"><div>
            <h3>
              <span class="m-doc-wrap-bumper">void bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a4a3dd965b224c85a25ee4ed0e6024b43" class="m-doc-self">generate_top_left</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">top_left_x</td>
                  <td>Horizontal top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>top_left_y</td>
                  <td>Vertical top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a2e8ee5db7020f0128b397e21136e2c75"><div>
            <h3>
              <span class="m-doc-wrap-bumper">void bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a2e8ee5db7020f0128b397e21136e2c75" class="m-doc-self">generate_top_left</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; top_left_position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">top_left_position</td>
                  <td>Top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a1ca037e46d4108df1598c35d30b4b10e"><div>
            <h3>
              <span class="m-doc-wrap-bumper">bool bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a1ca037e46d4108df1598c35d30b4b10e" class="m-doc-self">generate_optional</a>(</span><span class="m-doc-wrap">const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><code>true</code> if the text generation finished successfully, otherwise <code>false</code>.</td>
                </tr>
              </tfoot>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="afb6a6933bcae080758df5b636265a178"><div>
            <h3>
              <span class="m-doc-wrap-bumper">bool bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#afb6a6933bcae080758df5b636265a178" class="m-doc-self">generate_optional</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">x</td>
                  <td>Horizontal position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>y</td>
                  <td>Vertical position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><code>true</code> if the text generation finished successfully, otherwise <code>false</code>.</td>
                </tr>
              </tfoot>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a71f5a0e2f9943084837eb33b1a9f8f85"><div>
            <h3>
              <span class="m-doc-wrap-bumper">bool bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a71f5a0e2f9943084837eb33b1a9f8f85" class="m-doc-self">generate_optional</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">position</td>
                  <td>Position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><code>true</code> if the text generation finished successfully, otherwise <code>false</code>.</td>
                </tr>
              </tfoot>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a6aec8204e94548644cb8de1da209b66b"><div>
            <h3>
              <span class="m-doc-wrap-bumper">bool bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a6aec8204e94548644cb8de1da209b66b" class="m-doc-self">generate_top_left_optional</a>(</span><span class="m-doc-wrap"><a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_x,
              <a href="namespacebn.html#a0de0484a51e353c5b48db21590f4dfc9" class="m-doc">fixed</a> top_left_y,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">top_left_x</td>
                  <td>Horizontal top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>top_left_y</td>
                  <td>Vertical top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
          <section class="m-doc-details" id="a658bb7f804fe078499c41d6478c86d47"><div>
            <h3>
              <span class="m-doc-wrap-bumper">bool bn::<wbr />sprite_text_generator::<wbr /></span><span class="m-doc-wrap"><span class="m-doc-wrap-bumper"><a href="#a658bb7f804fe078499c41d6478c86d47" class="m-doc-self">generate_top_left_optional</a>(</span><span class="m-doc-wrap">const <a href="namespacebn.html#a9d90d92eb951850d75801f5508fc8e90" class="m-doc">fixed_<wbr />point</a>&amp; top_left_position,
              const <a href="classbn_1_1string__view.html" class="m-doc">string_<wbr />view</a>&amp; text,
              <a href="classbn_1_1ivector.html" class="m-doc">ivector</a>&lt;<a href="classbn_1_1sprite__ptr.html" class="m-doc">sprite_<wbr />ptr</a>&gt;&amp; output_sprites) const</span></span>
            </h3>
            <p>Generates text sprites for the given single line of text.</p>
            <table class="m-table m-fullwidth m-flat">
              <thead>
                <tr><th colspan="2">Parameters</th></tr>
              </thead>
              <tbody>
                <tr>
                  <td style="width: 1%">top_left_position</td>
                  <td>Top-left position of the first generated sprite, considering the current alignment.</td>
                </tr>
                <tr>
                  <td>text</td>
                  <td>Single line of text to print.</td>
                </tr>
                <tr>
                  <td>output_sprites</td>
                  <td>Generated text sprites are stored in this vector.</td>
                </tr>
              </tbody>
              <tfoot>
                <tr>
                  <th>Returns</th>
                  <td><code>true</code> if the text generation finished successfully, otherwise <code>false</code>.</td>
                </tr>
              </tfoot>
            </table>
<p>Keep in mind that this vector is not cleared before generating text.</p>
          </div></section>
        </section>
      </div>
    </div>
  </div>
</article></main>
<div class="m-doc-search" id="search">
  <a href="#!" onclick="return hideSearch()"></a>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-m-8 m-push-m-2">
        <div class="m-doc-search-header m-text m-small">
          <div><span class="m-label m-default">Tab</span> / <span class="m-label m-default">T</span> to search, <span class="m-label m-default">Esc</span> to close</div>
          <div id="search-symbolcount">&hellip;</div>
        </div>
        <div class="m-doc-search-content">
          <form>
            <input type="search" name="q" id="search-input" placeholder="Loading &hellip;" disabled="disabled" autofocus="autofocus" autocomplete="off" spellcheck="false" />
          </form>
          <noscript class="m-text m-danger m-text-center">Unlike everything else in the docs, the search functionality <em>requires</em> JavaScript.</noscript>
          <div id="search-help" class="m-text m-dim m-text-center">
            <p class="m-noindent">Search for symbols, directories, files, pages or
            modules. You can omit any prefix from the symbol or file path; adding a
            <code>:</code> or <code>/</code> suffix lists all members of given symbol or
            directory.</p>
            <p class="m-noindent">Use <span class="m-label m-dim">&darr;</span>
            / <span class="m-label m-dim">&uarr;</span> to navigate through the list,
            <span class="m-label m-dim">Enter</span> to go.
            <span class="m-label m-dim">Tab</span> autocompletes common prefix, you can
            copy a link to the result using <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">L</span> while <span class="m-label m-dim">⌘</span>
            <span class="m-label m-dim">M</span> produces a Markdown link.</p>
          </div>
          <div id="search-notfound" class="m-text m-warning m-text-center">Sorry, nothing was found.</div>
          <ul id="search-results"></ul>
        </div>
      </div>
    </div>
  </div>
</div>
<script src="search-v2.js"></script>
<script src="searchdata-v2.js" async="async"></script>
<footer><nav>
  <div class="m-container">
    <div class="m-row">
      <div class="m-col-l-10 m-push-l-1">
        <p>Butano Docs. Created with <a href="https://doxygen.org/">Doxygen</a> 1.14.0 and <a href="https://mcss.mosra.cz/">m.css</a>.</p>
      </div>
    </div>
  </div>
</nav></footer>
</body>
</html>
